---
title:  Transaction Coding Examples
---

<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

This section provides several code examples for writing and executing transactions.

-   **[Basic Transaction Example](../../developing/transactions/transactions_overview.html)**

    This example operates on two replicated regions. It begins a transaction, updates one entry in each region, and commits the result.

-   **[Basic Suspend and Resume Transaction Example](../../developing/transactions/transaction_suspend_resume_example.html)**

    This example suspends and resumes a transaction.

-   **[Transaction Embedded within a Function Example](../../developing/transactions/transactional_function_example.html)**

    This example demonstrates a function that does transactional updates to Customer and Order regions.

-   **[Geode JTA Transaction Example](../../developing/transactions/transaction_jta_gemfire_example.html)**

    An example code fragment shows how to run a JTA global transaction using Geode as the JTA transaction manager.

-   **[JCA Resource Adapter Example](../../developing/transactions/jca_adapter_example.html)**

    This example shows how to use the JCA Resource Adapter in Geode .


